package com.huifer.wgx.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.math.BigDecimal;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import lombok.EqualsAndHashCode;

/**
 * <p>Title : ResultPointEntity </p>
 * <p>Description : </p>
 *
 * @author huifer
 * @date 2019-03-20
 */
@Entity
@Table(name = "t_result_point", schema = "at15", catalog = "")
@EqualsAndHashCode
public class ResultPointEntity {

    private Long resultPointId;
    private String resultPointName;
    private BigDecimal resultPointX;
    private BigDecimal resultPointY;
    private BigDecimal resultPointZ;
    private BigDecimal resultPointDeep;
    private String resultPointIsmesh;
    private String resultPointSize;
    private String resultPointManholeCoverType;
    private Long workId;
    private Long personnelId;
    private Collection<ResultLineEntity> tResultLinesByResultPointId;
    private Collection<ResultLineEntity> tResultLinesByResultPointId_0;
    private WorkEntity tWorkByWorkId;
    private PersonnelEntity tPersonnelByPersonnelId;
    private String pointType;



    @Id
    @Column(name = "result_point_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getResultPointId() {
        return resultPointId;
    }

    public void setResultPointId(Long resultPointId) {
        this.resultPointId = resultPointId;
    }

    @Basic
    @Column(name = "result_point_name")
    public String getResultPointName() {
        return resultPointName;
    }

    public void setResultPointName(String resultPointName) {
        this.resultPointName = resultPointName;
    }

    @Basic
    @Column(name = "result_point_x")
    public BigDecimal getResultPointX() {
        return resultPointX;
    }

    public void setResultPointX(BigDecimal resultPointX) {
        this.resultPointX = resultPointX;
    }

    @Basic
    @Column(name = "result_point_y")
    public BigDecimal getResultPointY() {
        return resultPointY;
    }

    public void setResultPointY(BigDecimal resultPointY) {
        this.resultPointY = resultPointY;
    }

    @Basic
    @Column(name = "result_point_z")
    public BigDecimal getResultPointZ() {
        return resultPointZ;
    }

    public void setResultPointZ(BigDecimal resultPointZ) {
        this.resultPointZ = resultPointZ;
    }

    @Basic
    @Column(name = "result_point_deep")
    public BigDecimal getResultPointDeep() {
        return resultPointDeep;
    }

    public void setResultPointDeep(BigDecimal resultPointDeep) {
        this.resultPointDeep = resultPointDeep;
    }

    @Basic
    @Column(name = "result_point_ismesh")
    public String getResultPointIsmesh() {
        return resultPointIsmesh;
    }

    public void setResultPointIsmesh(String resultPointIsmesh) {
        this.resultPointIsmesh = resultPointIsmesh;
    }

    @Basic
    @Column(name = "result_point_size")
    public String getResultPointSize() {
        return resultPointSize;
    }

    public void setResultPointSize(String resultPointSize) {
        this.resultPointSize = resultPointSize;
    }

    @Basic
    @Column(name = "result_point_manhole_cover_type")
    public String getResultPointManholeCoverType() {
        return resultPointManholeCoverType;
    }

    public void setResultPointManholeCoverType(String resultPointManholeCoverType) {
        this.resultPointManholeCoverType = resultPointManholeCoverType;
    }

    @Basic
    @Column(name = "work_id")
    public Long getWorkId() {
        return workId;
    }

    public void setWorkId(Long workId) {
        this.workId = workId;
    }

    @Basic
    @Column(name = "personnel_id")
    public Long getPersonnelId() {
        return personnelId;
    }

    public void setPersonnelId(Long personnelId) {
        this.personnelId = personnelId;
    }



    @OneToMany(mappedBy = "tResultPointByResultLineStartPointId")
    @JsonIgnore
    public Collection<ResultLineEntity> gettResultLinesByResultPointId() {
        return tResultLinesByResultPointId;
    }

    public void settResultLinesByResultPointId(
            Collection<ResultLineEntity> tResultLinesByResultPointId) {
        this.tResultLinesByResultPointId = tResultLinesByResultPointId;
    }

    @OneToMany(mappedBy = "tResultPointByResultLineEndPointId")
    @JsonIgnore
    public Collection<ResultLineEntity> gettResultLinesByResultPointId_0() {
        return tResultLinesByResultPointId_0;
    }

    public void settResultLinesByResultPointId_0(
            Collection<ResultLineEntity> tResultLinesByResultPointId_0) {
        this.tResultLinesByResultPointId_0 = tResultLinesByResultPointId_0;
    }

    @ManyToOne
    @JoinColumn(name = "work_id", referencedColumnName = "work_id",insertable = false,updatable = false)
    public WorkEntity gettWorkByWorkId() {
        return tWorkByWorkId;
    }

    public void settWorkByWorkId(WorkEntity tWorkByWorkId) {
        this.tWorkByWorkId = tWorkByWorkId;
    }

    @ManyToOne
    @JoinColumn(name = "personnel_id", referencedColumnName = "personnel_id",insertable = false,updatable = false)
    public PersonnelEntity gettPersonnelByPersonnelId() {
        return tPersonnelByPersonnelId;
    }

    public void settPersonnelByPersonnelId(PersonnelEntity tPersonnelByPersonnelId) {
        this.tPersonnelByPersonnelId = tPersonnelByPersonnelId;
    }
    @Basic
    @Column(name = "result_point_type")
    public String getPointType() {
        return pointType;
    }

    public void setPointType(String pointType) {
        this.pointType = pointType;
    }
}
